package com.wench.leetcode.simple_factory;

/**
 * @author epro
 */
public class MaskFactory {

    public Mask create(String type) {
        switch (type) {
            case "Surgical":
                return new SurgicalMask();
            case "N95":
                return new N95Mask();
            default:
                throw new IllegalArgumentException("很抱歉,暂时没有这种水果");
        }
    }
}